<script lang="ts">
import { defineComponent, onMounted, ref } from 'vue';

interface AppData {
  count: number | string;
}

interface AppProps {
  msg: string;
  msg1?: string;
}

export default defineComponent<AppProps, {}, AppData>({
  data () {
    return {
      count: 0,
    };
  },
  methods: {
    onAdd () {
      this.count = 'hello';
    },
  },
  // setup () {
  //   const count = ref(0);
  //   function onAdd () {
  //     count.value++;
  //   }
  //   return {
  //     count,
  //     onAdd,
  //   };
  // },
});
</script>

<template>
  <div>
    {{ count }}
    <button @click="onAdd">+1</button>
  </div>
</template>
